package kr.hkit.androidcomplete01.chapter08;

import kr.hkit.androidcomplete01.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

public class HandlerAccess extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch08_main);
		
		
	
		LinearLayout linear = (LinearLayout) findViewById(R.id.linear);
		linear.setOnTouchListener(new View.OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				if (event.getAction() == MotionEvent.ACTION_DOWN){
					TextView text = (TextView) findViewById(R.id.text);
					return true;
				}
				return false;
			}
		});
	}
}
